<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%= h(@pageTitle) %></title>
  <%= stylesheet_link_tag 'scaffold' %>
  <%= javascript_include_tag "jquery", "application" %>
  <%= javascript_include_tag "jquery.blockUI", "application" %>
  <%= javascript_include_tag "jquery-ui", "application" %>
  <%= yield :javascript %>
</head>
<body>
	<div id="main_header" class="main_header">
    <div id="logo_img">
	</div>
	<div id="logo_title">
      RAILGUNS
	  </div>
    <div id="title">
      BLISS
    </div>
    <div id="navigation">
      <div class="home"><%= link_to 'Accueil', homes_path %></div><p style="color:white;text-align:center;"><%=flash[:notice]%></p>    
      <% if !authenticated? -%>
       <div class="help">aide</div>
      <div class="authentified">Interface Administrateur</div>
      <% end -%>
    </div>
    <div id="help">
      <h3> Vous pouvez utiliser l'interface interractive</h3>
      <ul style="text-align:left">
        <li> Double click dans l'écran de supervision : création d'une nouvelle salle</li>
        <li> Click dans la salle : création d'une nouvelle machine</li>
      </ul>
    </div>
	</div>	
	<div id="main_content" class="main_content">
		<div id="main_menu" class="main_menu">
      <div id="menu">
        <p>Authentification</p>  
        <% if authenticated? -%>
          <div class="log">
            <% form_tag sessions_path do %>
              <p>
                Identifiant :<br/>
                <%= text_field_tag 'name' %>
              </p>
              <p>
                Mot de passe :<br/>
                <%= password_field_tag 'password' %>
              </p>
              <p>
                <%= submit_tag 'OK' %>
              </p>
            <% end %>
          </div>
        <% else -%>       
          <ul class="title_menu">
            <div class="login">Bonjour <%= session[:USER_NAME] %></div>
            <%= link_to "Deconnexion", logout_url %>
          </ul>
        <% end -%>
        <p>Salles</p>
        <ul class="title_menu">
          <li><%= link_to 'Gestions des salles', salles_path %></li>
        </ul>
        <p>Machines</p>
        <ul class="title_menu">
          <li><%= link_to 'Gestions des machines', machines_path %></li>
        </ul>
        <p>Incidents</p>
        <ul class="title_menu">
          <li><%= link_to 'Gestions des incidents', incidents_path %></li>
		  <li><%= link_to 'Gestions des types d\'incidents', type_incidents_path %></li>
        </ul>
        <p>Administration<p>
        <ul class="title_menu">
          <% if !authenticated? -%>
            <li><%= link_to 'Gestions des utilisateurs', utilisateurs_path %></li>
          <% end -%>
          <li><%= link_to 'Statistiques', statistiques_path %></li>
        </ul>
      </div>
		</div>
		<div id="content" class="content">
      <div id="main">
        <p class="popup_error"><%= flash[:notice_error] %></p>
		<p class="incident_error"><%= flash[:notice_error] %></p>
        <%= yield %>
		
      </div>
	</div>
	<div id="main_footer" class="main_footer">
	</div>
</body>
</html>